<template>
	<div style="background-color: #f0f0f0;color: #e61111;">
		<div>
			<section>
			<div>
				<div id="imgbox">
					<div class="n-imgbox">
						<div>
							<u-swiper :list="PicturesList" height="700" border-radius="0"></u-swiper>
						</div>
					</div>
				</div>

				<div class="n-price">
					<div class="n-price__left">
						<span class="curprice"><span class="curnum">¥{{form.Rewards?form.Rewards:0}}推广奖励</span></span>
					</div>
					<!-- <div class="cart u-pr-20" style="line-height: 110rpx;" @click="doCollect">
						<div style="margin: 0 auto;">
							<u-icon name="star-fill" color="#f02323" size="45" v-if="isFav_chance"></u-icon>
							<u-icon name="star" color="#9d9d9d" size="45" v-else></u-icon>
						</div>
					</div> -->
				</div>

				<div id="J_wb_rebate" style="margin: 10px 10px 0px;"></div>

				<div class="n-prdinfo">
					<h4 class="tit f-els-2">{{form.Subject?form.Subject:''}}</h4>
					<div class="taginfo" v-if="form.KeyWord">
					  <u-tag
						  v-for="(item, index) in form.KeyWord.split(',')"
						  :key="index"
						  :text="item"
						  type="primary"
						  mode="dark"
					  ></u-tag>
					</div>
				</div>
				<div class="u-graybar"></div>
				<div id="infoblocks">
					<ul class="n-activitybox">
						<li class="itm n-expressinfo">
							<div class="name">剩余名额：</div>
							<div class="cnt expressinfo f-els-1">
								<p class="expresstxt itm-value">
									{{form.RemainQuota}}
								</p>
							</div>
							<div class="v-linkicon"></div>
						</li>
						
						<li class="itm n-expressinfo">
							<div class="name">推广结束时间<span class="u-pl-5"><u-icon name="question-circle" top="1" size="30" @click="showTips('EndTime')"></u-icon></span>：</div>
							<div class="cnt expressinfo f-els-1">
								<p class="expresstxt itm-value">
									{{form.EndTime}}
								</p>
							</div>
							<div class="v-linkicon"></div>
						</li>
						<li class="itm n-expressinfo">
							<div class="name">提交推广成果周期<span class="u-pl-5"><u-icon name="question-circle" top="1" size="30" @click="showTips('LimitDays')"></u-icon></span>：</div>
							<div class="cnt expressinfo f-els-1">
								<p class="expresstxt itm-value">
									{{form.LimitDays?form.LimitDays:0}}天
								</p>
							</div>
							<div class="v-linkicon"></div>
						</li>
						<li class="itm n-expressinfo" v-if="form.InspectorName">
							<div class="name">验收人员<span class="u-pl-5"><u-icon name="question-circle" top="1" size="30" @click="showTips('Rate')"></u-icon></span>：</div>
							<div class="cnt expressinfo f-els-1">
								<p class="expresstxt itm-value">
									{{form.InspectorName?form.InspectorName:''}}
								</p>
							</div>
							<div class="v-linkicon"></div>
						</li>
					</ul>
				</div>
				<div id="combobox"></div>
			</div>
			</section>
			<p class="v-sperate"></p>
			<section class="j-block bg-white">
				<div id="qualityreport"><!--Regular if72--></div>
				
				<div class="n-goodsdetailbar">
					<p class="txt">推广内容</p>
					<img class="v-img" src="https://dev.openea.net/linkey/bpm/appfile/Review/8cdd326d-c127-4f53-8183-85fac74233de.jpg">
				</div>
				<div class="u-pb-40">
					<div class="richtext-content" v-html="this.escape2Html(form.PromotionContent)"></div>
				</div>
				
				<div class="n-goodsdetailbar">
					<p class="txt">验收要求</p>
					<img class="v-img" src="https://dev.openea.net/linkey/bpm/appfile/Review/8cdd326d-c127-4f53-8183-85fac74233de.jpg">
				</div>
				<div class="u-pb-40">
					<div class="richtext-content" v-html="this.escape2Html(form.Requirement)"></div>
				</div>
				
			</section>
		</div>
		
		<div style="height: 30px;"></div>

		<article class="m-buybar">
			<div class="btn-wrap">
				<div @click="contactCustomerService" class="collect u-pl-10" style="display: flex;flex-direction: column;justify-content: center;text-align: center;">
					<div style="margin: 0 auto;">
						<u-icon name="chat" color="#9d9d9d" size="40"></u-icon>
					</div>
					<span>客服</span>
				</div>
				<div class="cart u-pr-5">
					<ShareBtn :docUnid="shareData.docUnid" :url="shareData.url" :route="shareData.route" :style="shareData.style"></ShareBtn>
				</div>
				
				<a href="#" class="view-pro btn" @click="toViewProgress" v-if="ViewProgressBtn">查看进度</a>
				<a href="#" class="recovery btn" @click="selectRecycleUsers" v-if="EndEvaluationBtn">回收名额</a>
				<a href="#" class="buynow btn" @click="ShowModal" v-if="EndEvaluationBtn">结束推广</a>
				<a href="#" class="buynow btn" @click="SignUp" v-else>报名推广</a>
			</div>
		</article>
		
		<!-- 结束推广任务提示 -->
		<u-modal 
		  ref="uModal"
		  title="平台提示"
		  v-model="EndEvaluation_Show"
		  show-cancel-button
		  confirm-text="确认"
		  cancel-text="取消"
		  @confirm="EndEvaluation"
		>
		  <div class="u-p-20">
		      <p>【{{form.Subject}}】计划于 {{form.EndTime}} 自动结束，您确定手动干预提前结束推广任务？若此时结束会提前将匹配机会回收，已报名未提交成果回收，已提交成果未验收强制结束当未验收处理，请确认是否继续？</p>       
		  </div>
		</u-modal>
		
		<!-- 模态框 -->
		<u-modal v-model="CustomerService_Show" confirm-text="关闭" title="客服微信">
		    <view class="slot-content">
			  <rich-text :nodes="this.escape2Html(CustomerService.topPrompt)"></rich-text>
			  <div class="u-center u-pt-5 u-pb-5">
			  		<u-image width="300rpx" height="300rpx" :src="CustomerService.csQrCode" @longpress="saveImg"></u-image>
			  </div>
			  <rich-text :nodes="this.escape2Html(CustomerService.bottomPrompt)"></rich-text>
		    </view>
		</u-modal>
		
		<!-- 点击问号弹出提示窗 -->
		<u-modal v-model="TipsShow" :content="TipsContent"></u-modal>
		
	</div>
</template>

<script>
	import shareMixins from '@/mixins/share';
	export default {
		mixins: [shareMixins],
		data() {
			return {
				form: {
					MainDocUnid: '', // 主文档id
					PromotionContent: '',// 推广内容
					Requirement: '',// 验收要求
				},
				PicturesList: [], // 推广图片
				TopFiles: [],// 顶部轮播图
				PromoteFiles: [],// 推广材料
				AcceptanceFiles: [],// 验收模板
				shareData: {
				  docUnid: '',
				  url: '',
				  route: '',
				  style: 3
				},
				ViewProgressBtn: false,
				EndEvaluationBtn: false,
				EndEvaluation_Show: false,// 结束推广任务提示
				isFav_chance: false,// 是否已收藏
				CustomerService_Show: false,
				CustomerService: {},
				TipsShow: false,
				TipsContent: '',
				EndTimeContent: '推广任务中最迟的验收成果时间，到此时间推广任务将结束所有验收环节进入财务核算环节。到达该时间，平台会收回已报名但未提交推广成果的拍档，同时会以未验收(作废)来标识已提交推广成果但验收人未按时验收的拍档，最后让该推广任务进入财务核算环节。在财务核算环节，财务将清算此次推广费用是否已用完，未用的将会退还给任务发起人。',
				LimitDaysContent: '当拍档报名参与推广任务后，拍档将被要求在此周期(天)内提交第1次推广成果，否则将以过期作废为由收回拍档资格让予其他人。若拍档在临近推广结束时间前报名，且按此周期(天)算出的时间超出推广结束时间，则以推广结束时间为拍档最后提交推广成果的时间，超过该时间未提交推广成果的也将以过期作废为由收回拍档的资格。',
				RateContent: '允许从私有场景的所有拍档储备中，选择一拍档来负责对当前推广的验收和后续评级动作。让采购人只负责采购付款，指定更专业的人做验收和评级。'
			}
		},
		
		onLoad(options) {
			
			// 未登录跳转到登录页面
			var loginRes = this.checkLogin();
			if (!loginRes) {
			  return false;
			}
			
			// 主文档id
			this.form.MainDocUnid = options.docUnid
			if(this.isNotNull(this.form.MainDocUnid)){
				this.getPromoteDetails()
			} else {
				this.showMSG('error','数据有误')
				setTimeout(() => {
					this.goBack()
				}, 1500)
			}
			//分享组件数据初始化
			this.shareData.docUnid = this.form.MainDocUnid
			this.shareData.url = '/pages_private_scene2/Promote2/SignUp?docUnid=' + this.form.MainDocUnid,
			this.shareData.route = this.getCurrentPageUrl(this)
			
		},
		
		methods: {
			/**
			 * 获取推广任务详情
			 */
			async getPromoteDetails() {
			  const userInfo = uni.getStorageSync('userInfo')
			  let result = await this.$u.api.unifyRequest({
					userId: userInfo.userId,
					nickName: userInfo.nickName,
					appid: 'Promote2',
					wf_num: 'R_Promote2_BL004',
					docUnid: this.form.MainDocUnid,
				    loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if(result.code == 200){
					this.isFav_chance = result.isFav_chance
					this.form = result.data
					
					this.form.Partnerid = userInfo.userId// 参与者id
					this.form.PartnerName = userInfo.nickName;// 参与者昵称
					this.form.MainDocUnid = result.data.WF_OrUnid;// 主文档id
					this.form.MainTaskNumber = result.data.TaskNumber;// 主单号
					this.form.Rewards = result.data.AverageCost; // 人均推广费（推广奖励）
					
					if(this.isNotNull(this.form.Pictures)){
						this.PicturesList = this.form.Pictures.split(",")
					} else {
						this.getTopFiles(this.form.MainDocUnid);
					}
					
					// 判断当前用户身份，显示不同按钮
					if(this.form.Initiatorid == userInfo.userId){
						// 1.当前用户为任务发起人
						this.EndEvaluationBtn = true;// 显示结束推广按钮，发起者可以结束当前实例
						this.ViewProgressBtn = true;// 有查看验收成果进度的权限
						
					} else if(this.form.Inspectorid == userInfo.userId){
						// 2.当前用户为验收人
						this.ViewProgressBtn = true;// 有查看验收成果进度的权限
					}
					
					// 客服信息
					if(this.isNotNull(result.CustomerService)){
						this.CustomerService = result.CustomerService
					}
				}
			},
			
			/**
			 * 报名推广
			 */
			async SignUp(){
				
				// 未登录跳转到登录页面
				var loginRes = this.checkLogin()
				if (!loginRes) {
				  return false;
				}
				
				const userInfo = uni.getStorageSync('userInfo')
				let result = await this.$u.api.unifyRequest({
					userId: userInfo.userId,
					nickName: userInfo.nickName,
					appid: 'Promote2',
					wf_num: 'R_Promote2_BL005',
					WF_formData: this.form,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if(result.code == 200){
					let SubDocUnid = result.SubDocUnid
					uni.reLaunch({url:'/pages_private_scene2/Promote2/common/result?mode=2&SubDocUnid='+SubDocUnid+'&Subject='+this.form.Subject+'&EndTime='+this.form.EndTime+'&InitiatorName='+this.form.InitiatorName});
				} else {
					this.showMSG('none',result.msg)
					setTimeout(() => {
						this.$u.route(result.url)
					}, 1500)
				}
			},
			
			/**
			 * 点击结束推广弹窗提示
			 */
			ShowModal(){
				this.EndEvaluation_Show = true
			},
			
			/**
			 * 结束推广
			 */
			async EndEvaluation(){
				
				// 未登录跳转到登录页面
				var loginRes = this.checkLogin()
				if (!loginRes) {
				  return false;
				}
				const userInfo = uni.getStorageSync('userInfo');
				let result = await this.$u.api.unifyRequest({
					userId: userInfo.userId,
					nickName: userInfo.nickName,
					appid: 'Promote2',
					wf_num: 'R_Promote2_BL017',
					docUnid: this.form.WF_OrUnid,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if(result.code == 200){
					this.showMSG('none',result.msg)
					setTimeout(() => {
						this.goBack()
					}, 1500)
				}else{
					this.showMSG('none',result.msg)
				}
			},
			
			/**
			 * 收藏/取消收藏
			 */
			async doCollect(){
				//未登录跳转到登录页面
				var loginRes = this.checkLogin()
				if (!loginRes) {
				  return false;
				}
				if(this.isFav_chance){
					//取消收藏
					this.cancelCollectChange()
				} else {
					//收藏
					this.collectChange()
				}
			},
			
			/**
			 * 收藏机会
			 */
			async collectChange(){
				const userInfo = uni.getStorageSync('userInfo')
				let result = await this.$u.api.unifyRequest({
					appid: 'SceneModule',
					wf_num: 'R_SceneModule_BL016',
					type: '1',
					SceneAssetsId: this.form.SceneAssetsId,
					docUnid: this.form.WF_OrUnid,
					userId: userInfo.userId,
					nickName: userInfo.nickName,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if(result.code == 200){
					this.isFav_chance = true
					this.showMSG('success','收藏成功')
				}else{
					this.showMSG('error','收藏失败')
				}
			},
			
			/**
			 * 取消收藏机会
			 */
			async cancelCollectChange(){
				const userInfo = uni.getStorageSync('userInfo')
				let result = await this.$u.api.unifyRequest({
					appid: 'SceneModule',
					wf_num: 'R_SceneModule_BL017',
					SceneAssetsId: this.form.SceneAssetsId,
					docUnid: this.form.WF_OrUnid,
					userId: userInfo.userId,
					loading: true // 默认发起请求会有一个全局的Loading，设置false可去掉
				});
				if(result.code == 200){
					this.isFav_chance = false
					this.showMSG('success','取消收藏成功')
				}else{
					this.showMSG('error','取消收藏失败')
				}
			},
			
			/**
			 * 点击联系客服
			 */
			contactCustomerService(){
				console.log("********")
				console.log(this.CustomerService)
				if(this.isNotNull(this.CustomerService.csQrCode)){
					this.CustomerService_Show = true
				} else {
					this.showMSG('none','请联系平台管理员')
				}
			},
			
			/**
			 * 发起人/验收人查看进度
			 */
			toViewProgress(){
				this.$u.route('/pages_private_scene2/Promote2/Reports?docUnid='+this.form.MainDocUnid)
			},
			
			/**
			 * 选择回收的用户
			 */
			selectRecycleUsers(){
				this.$u.route('/pages_private_scene2/Promote2/common/selectRecycleUsers?docUnid='+this.form.MainDocUnid)
			},
			
			/**
			 * 点击问号提示
			 */
			showTips(type){
				if(type == 'EndTime'){
					this.TipsContent = this.EndTimeContent
					this.TipsShow = true
				}else if(type == 'LimitDays'){
					this.TipsContent = this.LimitDaysContent
					this.TipsShow = true
				}else if(type == 'Rate'){
					this.TipsContent = this.RateContent
					this.TipsShow = true
				}
			},
			
			/**
			 * 初始化附件列表---顶部图
			 * @param {Object} orunid 文档id
			 */
			async getTopFiles(orunid) {
			  const userInfo = uni.getStorageSync('userInfo')
			  let result = await this.$u.api.unifyRequest({
				userId: userInfo.userId,
				nickName: userInfo.nickName,
				appid: 'Promote2',
				wf_num: 'R_FILE_BL002',
				orunid: orunid,
				fieldName: 'TopPicture',
				loading: false // 默认发起请求会有一个全局的Loading，设置false可去掉
			  });
			  if(result.code == 200){
				this.TopFiles = result.data
				this.TopFiles.forEach((item, index) => {
					if(this.isNotNull(item.url)){
						this.PicturesList.push(item.url);
					}
				});
				console.log("this.TopFiles=", this.TopFiles)
				console.log("this.PicturesList=", this.PicturesList)
			  }
			},
		}
	}
</script>

<style scoped>
	.m-sticknav {
		width: 100%;
		height: 46px;
		border-bottom: 1px solid #ddd;
	}

	.m-sticknav .navbar {
		position: relative;
		height: 45px;
		width: 100%;
		background: #fff;
	}

	.m-sticknav .navbar .tabbox {
		margin: 0 50px;
		height: 100%;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
	}

	.m-sticknav .navbar .tabbox .itm {
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		text-align: center;
		height: 45px;
		line-height: 45px;
		font-size: 14px;
		color: #666;
	}

	.m-sticknav .navbar .tabbox .cur {
		position: relative;
		color: #333;
	}

	.m-sticknav .navbar .tabbox .cur:after {
		position: absolute;
		content: "";
		width: 28px;
		height: 1px;
		background: #e31436;
		left: 50%;
		margin-left: -14px;
		bottom: 12px;
	}

	.m-sticknav .navbar .v-returnicon {
		position: absolute;
		left: 0px;
		top: 0px;
		height: 45px;
		width: 45px;
		background-size: 200px;
	}

	.m-sticknav .navbar .v-homeicon {
		position: absolute;
		right: 0px;
		top: 0px;
		height: 45px;
		width: 45px;
		background-size: 200px;
	}
	
	/*  购物车  */
	.n-imgbox {
		position: relative;
		width: 100%;
	}

	.n-imgbox .n-slideimg {
		position: relative;
		z-index: 0;
		width: 100%;
		padding-top: 80%;
		height: auto;
		overflow: hidden;
		background: none;
	}

	.n-imgbox .n-slideimg .imglist {
		position: absolute;
		top: 0px;
		left: 0px;
		width: 100%;
		white-space: nowrap;
		line-height: 0px;
		font-size: 0px;
		-webkit-backface-visibility: hidden;
		-webkit-transform-style: preserve-3d;
		transform-style: preserve-3d;
		transition-duration: 0ms;
		-webkit-transition-duration: 0ms;
	}

	.n-imgbox .n-slideimg .imglist .itm {
		display: inline-block;
		width: 100%;
	}

	.n-imgbox .n-slideimg .imglist .v-img {
		width: 80%;
		margin: 0 10%;
		background-size: 62px;
	}

	.n-imgbox .n-slideimg .imgpagebox {
		position: absolute;
		white-space: nowrap;
		bottom: 16px;
		width: 100%;
		padding: 0 20px;
		line-height: 0;
		text-align: center;
		font-size: 0;
	}

	.n-imgbox .n-slideimg .imgpagebox .dot {
		display: inline-block;
		vertical-align: middle;
		width: 6px;
		height: 6px;
		margin-right: 9px;
		border-radius: 20px;
		background-color: #000;
	}

	.n-imgbox .n-slideimg .imgpagebox .dot.active {
		width: 8px;
		height: 8px;
		border: 1px solid #000;
		background-color: #fff;
	}

	.n-imgbox .tagbox {
		position: absolute;
		right: 15px;
		bottom: 15px;
		width: 4rem;
		height: 4rem;
	}

	.n-imgbox .tagbox .v-tagimg {
		display: block;
		width: 100%;
		height: 100%;
	}
	
	.n-colorimg {
		height: 4rem;
		overflow: hidden;
	}

	.n-colorimg .colorimgwrap {
		position: relative;
		height: 4rem;
		white-space: nowrap;
		vertical-align: top;
		overflow: auto;
		background: #f4f4f4;
		font-size: 0px;
		-webkit-overflow-scrolling: touch;
	}

	.n-colorimg .colorimgwrap .imgbox {
		position: relative;
		display: inline-block;
		vertical-align: top;
		margin: 0.5rem 0.8rem 0 0;
	}

	.n-colorimg .colorimgwrap .imgbox-1 {
		margin: 0.5rem 1.5rem 0 0.7rem;
	}

	.n-colorimg .colorimgwrap .imgbox .v-mainimg {
		vertical-align: top;
	}

	.n-colorimg .colorimgwrap .imgbox img {
		display: inline-block;
		width: 3rem;
		height: 3rem;
	}

	.n-colorimg .colorimgwrap .imgbox.active:after {
		content: "";
		position: absolute;
		top: 0;
		left: 0;
		border: 1px solid #666;
		width: 100%;
		height: 100%;
	}

	.n-colorimg .colorimgwrap .txt {
		display: inline-block;
		height: 3rem;
		line-height: 3rem;
		font-size: 12px;
		color: #666;
	}

	.n-colorimg .colorimgwrap .colorimg {
		display: inline-block;
		vertical-align: top;
		margin-left: 2px;
	}

	.n-colorimg .colorimgwrap .colorimg .itm {
		display: inline-block;
	}
	
	.n-price {
		padding-left: 10px;
		height: 50px;
		/* line-height: 50px; */
		width: 100%;
		/* font-size: 0px; */
		color: #000000;
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
	}

	.n-price__left {
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		flex: 1;
		line-height: 110rpx;
	}

	.n-price__right {
		display: -webkit-box;
		display: -webkit-flex;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		align-items: center;
		font-size: 12px;
		margin-right: 10px;
		font-weight: bold;
		margin-top: 10px;
	}

	.n-price .curprice {
		font-size: 15px;
		color: #e31436;
	}

	.n-price .curprice .curnum {
		font-size: 22px;
		font-weight: bold;
	}

	.n-price .mrkprice {
		text-decoration: line-through;
		margin-left: 8px;
		font-size: 13px;
		color: #999;
	}

	.n-price .tag {
		display: inline-block;
		padding: 0 5px;
		height: 15px;
		line-height: 15px;
		text-align: center;
		margin-left: 10px;
		vertical-align: 2px;
		font-size: 11px;
		color: #fff;
		background: #ff8587;
		border-radius: 3px;
	}

	.n-price .apptxt {
		float: right;
		padding: 3px 10px 0 0;
		font-size: 12px;
		color: #e31436;
	}

	.n-price .u-rtarr-1 {
		border-color: #e31436 #e31436 transparent transparent;
	}

	.n-price .f-fwb {
		font-weight: bold;
	}
	
	.n-prdinfo {
		margin: 0 10px 10px;
		border-top: 1px solid #f0f0f0;
	}

	.n-prdinfo .presaletag {
		display: inline-block;
		height: 17px;
		line-height: 17px;
		padding: 0 6px;
		margin-right: 2px;
		background: #96c9ec;
		color: #fff;
		border-radius: 2px;
		font-size: 13px;
		font-weight: normal;
	}

	.n-prdinfo .supermarkettag {
		display: inline-block;
		height: 17px;
		line-height: 15px;
		padding: 0 6px;
		margin-right: 2px;
		color: #e31436;
		font-size: 12px;
		font-weight: normal;
		border: 1px solid #e31436;
		-webkit-transform: translateY(-1px);
		transform: translateY(-1px);
	}

	.n-prdinfo .supermarkettag.z-mr {
		margin-right: 5px;
	}

	.n-prdinfo .tit {
		line-height: 18px;
		/* padding-top: 10px; */
		margin-bottom: 6px;
		width: 100%;
		font-size: 14px;
		color: #333;
		font-weight: bold;
	}

	.n-prdinfo .subtit {
		font-size: 13px;
		color: #333;
		line-height: 21px;
	}

	.n-prdinfo .subtit .spec {
		color: #e31436;
	}

	.n-prdinfo .presaletxt {
		color: #f00;
	}

	.n-prdinfo .taginfo {
		padding: 9px 0 5px 10px;
		margin-top: 10px;
		background: #f7f7f7;
		zoom:1;}

	.n-prdinfo .taginfo:after {
		display: block;
		clear: both;
		visibility: hidden;
		height: 0;
		overflow: hidden;
		content: ".";
	}

	.n-prdinfo .taginfo .v-flagimg {
		float: left;
		display: block;
		width: 16px;
		height: 16px;
		margin-right: 6px;
	}

	.n-prdinfo .taginfo .tagtxt {
		float: left;
		margin-right: 10px;
		font-size: 12px;
		color: #666;
	}
	
	.u-graybar {
		background: #f1f1f1;
		height: 10px;
	}
	
	.n-activitybox {
		margin: 0 20rpx;
		padding: 10rpx 20rpx;
		background-color: #FFFFFF;
	}

	.n-activitybox .itm {
		position: relative;
		padding: 9px 0;
		/* border-bottom: 1px solid #f0f0f0; */
		zoom:1;}

	.n-activitybox .itm:after {
		display: block;
		clear: both;
		visibility: hidden;
		height: 0;
		overflow: hidden;
		content: ".";
	}

	.n-activitybox .itm .name {
		float: left;
		height: 24px;
		line-height: 24px;
		font-size: 13px;
		color: #a9a6a6;
	}

	.n-activitybox .itm .cnt {
		margin-left: 50px;
		padding-top: 1px;
		padding-right: 10px;
	}

	.n-activitybox .itm:last-child {
		border-bottom: none;
	}

	.n-activitybox .v-linkicon {
		position: absolute;
		top: 0;
		bottom: 0;
		right: 0px;
		width: 10px;
		height: 10px;
		margin-top: auto;
		margin-bottom: auto;
		background-size: 200px;
	}
	
	.n-coupon .couponinfo {
		height: 25px;
		line-height: 24px;
		margin-top: -1px;
		/* overflow: hidden; */
		font-size: 0px;
	}

	.n-coupon .coupontxt {
		display: inline-block;
		height: 24px;
		line-height: 24px;
		padding: 0 6px;
		margin-right: 10px;
		border: 1px dotted #ff8587;
		color: #ff8785;
		font-size: 12px;
	}

	.n-coupon .txtinfo {
		color: #333;
		font-size: 12px;
		padding-right: 10px;
	}

	.n-coupon .v-link {
		display: block;
	}
	
	.n-skubody .cntbox {
		max-height: 15rem;
		overflow: hidden;
		margin: 10px 10px 0;
		zoom:1
	}

	.n-skubody .cntbox:after,.n-skubody .cntbox:before {
		display: table;
		content: "";
		line-height: 0
	}

	.n-skubody .cntbox:after {
		clear: both
	}

	.n-skubody .cntbox .propname {
		padding-left: 10px;
		height: 40px;
		line-height: 40px;
		font-size: 14px;
		color: #333
	}

	.n-skubody .cntbox .propbox {
		zoom:1}

	.n-skubody .cntbox .propbox:after,.n-skubody .cntbox .propbox:before {
		display: table;
		content: "";
		line-height: 0
	}

	.n-skubody .cntbox .propbox:after {
		clear: both
	}

	.n-skubody .cntbox .v-propbtn {
		float: left;
		height: 32px;
		line-height: 32px;
		display: inline-block;
		padding: 0 20px;
		margin: 0 10px 15px 0;
		border: 1px solid #bbb;
		border-radius: 3px
	}

	.n-skubody .cntbox .v-propbtn-1 {
		background: #ff8587;
		border-color: #ff8587;
		color: #fff
	}

	.n-skubody .cntbox .v-propbtn-2 {
		border-color: #ff8587;
		color: #ff8587;
		border-style: dashed
	}

	.n-skubody .cntbox .v-propbtn-3 {
		border-color: #bbb;
		color: #666;
		border-style: dashed
	}

	.n-skubody .cntbox .itm {
		border-bottom: 1px solid #ddd
	}

	.n-skubody .cntbox .itm:last-child {
		border-bottom: none
	}
	
	.n-brandbox {
		background: #fff;
	}

	.n-brandbox .tit {
		height: 45px;
		line-height: 45px;
		padding: 0 10px;
		font-size: 14px;
		color: #333;
	}

	.n-brandbox .brandwrap {
		position: relative;
		display: block;
		padding: 0 10px;
		height: 50px;
		margin: 0 0 10px 0;
	}

	.n-brandbox .brandwrap .v-brandimg {
		display: block;
		width: 50px;
		height: 50px;
		float: left;
		margin-right: 10px;
		border: 1px solid #f1f1f1;
	}

	.n-brandbox .brandwrap .name {
		padding-top: 4px;
		width: 50%;
		font-size: 13px;
		color: #333;
	}

	.n-brandbox .brandwrap .txt {
		padding-top: 3px;
		font-size: 13px;
		color: #666;
	}

	.n-brandbox .brandwrap .num {
		color: #e31436;
	}

	.n-brandbox .brandwrap .v-btn {
		position: absolute;
		right: 10px;
		top: 11px;
		padding-left: 40rpx;
		height: 28px;
		line-height: 28px;
		width: 90px;
		border: 1px solid #ddd;
		color: #333;
		font-size: 12px;
		border-radius: 4px;
	}

	.n-brandbox .brandwrap .v-btn:after {
		content: "";
		position: absolute;
		top: 7px;
		left: 10px;
		width: 15px;
		height: 15px;
		background-size: 200px;
	}

	.n-brandbox .listwrap {
		margin: 0 0 10px 10px;
		overflow: hidden;
		/* height: 4.973333rem; */
		height: 14rem;
	}

	.n-brandbox .prdlist {
		width: auto;
		white-space: nowrap;
		overflow: auto;
		/* height: 5.333333rem; */
		height: 11rem;
		font-size: 0;
		-webkit-overflow-scrolling: touch;
	}

	.n-brandbox .prdlist .itm {
		display: inline-block;
		/* width: 3.333333rem; */
		width: 7rem;
		/* margin-right: 0.266667rem; */
		margin-right: 0.5rem;
		vertical-align: top;
	}

	.n-brandbox .prdlist .itm .v-link {
		display: block;
	}

	.n-brandbox .prdlist .itm .v-img {
		display: block;
		/* width: 3.333333rem; */
		/* height: 3.333333rem; */
		width: 7rem;
		height: 7rem;
		background-size: 62px;
	}

	.n-brandbox .prdlist .itm .subtit {
		text-align: center;
		line-height: 1rem;
		height: 2rem;
		word-break: break-word;
		white-space: normal;
		margin: 6px 0 4px;
		font-size: 12px;
		color: #333;
	}

	.n-brandbox .prdlist .itm .priceinfo {
		text-align: center;
		height: 0.8rem;
		line-height: 0.8rem;
		margin-top: 6px;
		font-size: 12px;
	}

	.n-brandbox .prdlist .itm .priceinfo .curprice {
		font-size: 13px;
		color: #e73c3c;
	}

	.n-brandbox .prdlist .itm .priceinfo .mrkprice {
		text-decoration: line-through;
		font-size: 10px;
		color: #999;
	}

	.n-brandbox .prdlist .seemore {
		position: relative;
		display: inline-block;
		width: 7rem;
		min-height: 7rem;
		border: 1px solid #ccc;
	}

	.n-brandbox .prdlist .seemore .txtwrap {
		text-align: center;
	}

	.n-brandbox .prdlist .seemore .txtwrap .alltxt {
		display: inline-block;
		padding: 0 2px;
		height: 20px;
		line-height: 20px;
		border-bottom: 1px solid #ccc;
		font-size: 13px;
		color: #eb1511;
	}

	.n-brandbox .prdlist .seemore .moretxt {
		text-align: center;
		font-size: 12px;
		color: #666;
	}

	.n-brandbox .prdlist .seemore .cntbox {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 100%;
		-webkit-transform: translate(-50%,-50%);
		-moz-transform: translate(-50%,-50%);
		-ms-transform: translate(-50%,-50%);
		-o-transform: translate(-50%,-50%);
		transform: translate(-50%,-50%);
	}
	
	.n-description .txt {
		/* float: left; */
		position: relative;
		margin: 0 50rpx;
		line-height: 22px;
		font-size: 12px;
	}

	.n-description .txt:after {
		position: absolute;
		content: "";
		top: 8px;
		left: -10px;
		width: 6px;
		height: 6px;
		font-size: 20px;
		background: #ff8587;
		border-radius: 50%;
	}
	
	.n-distribution .addr {
		position: relative;
		line-height: 18px;
		margin-top: 2px;
		font-size: 12px;
		color: #333;
	}
	
	.n-distribution .tips {
		margin-top: 6px;
		padding-bottom: 1px;
		font-size: 12px;
		color: #666;
		line-height: 21px;
	}
	
	.n-commentbox {
		background: #fff;
	}

	.n-commentbox .tit {
		position: relative;
		height: 50px;
		line-height: 50px;
		padding: 0 10px;
		font-size: 14px;
		color: #333;
	}
	
	.f-els-2 {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	
	.n-recommendbox .recommendlist .itm .priceinfo {
		text-align: center;
		height: 0.7rem;
		line-height: 0.7rem;
		margin-top: 6px;
		font-size: 12px;
	}
	
	.mrkprice{
		padding-left: 8rpx;
	}
	
	.v-sperate {
		height: 10px;
		background: #f1f1f1;
	}
	
	.n-goodsdetailbar {
		position: relative;
		height: 44px;
	}

	.n-goodsdetailbar .txt {
		position: absolute;
		top: 0;
		left: 0px;
		z-index: 9;
		width: 100%;
		height: 44px;
		line-height: 44px;
		text-align: center;
		font-size: 14px;
		font-weight: bold;
	}

	.n-goodsdetailbar .v-img {
		display: block;
		position: absolute;
		top: 0px;
		left: 0px;
		width: 100%;
		height: 90rpx;
	}
	
	img {
		vertical-align: middle;
		border: 0;
	}
	
	.m-buybar {
		position: fixed;
		z-index: 999;
		bottom: 0;
		left: 0;
		width: 100%;
		height: 50px;
		background: #fff;
	}

	.m-buybar .btn-wrap {
		height: 100%;
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;
		-webkit-box-align: center;
		-webkit-align-items: center;
		-ms-flex-align: center;
		align-items: center;
	}

	.m-buybar a {
		display: block;
		height: 50px;
		vertical-align: top;
		font-size: 15px;
		line-height: 50px;
		text-align: center;
	}

	.m-buybar .btn {
		-webkit-box-flex: 1;
		-webkit-flex: 1;
		-ms-flex: 1;
		flex: 1;
	}

	.m-buybar .buynow {
		color: #fff;
		background: #e31436;
	}

	.m-buybar .buynow.btn-large {
		border: none;
		background-color: #d22147;
		color: #fff;
	}

	.m-buybar .buynow.dis {
		color: #fff;
		background-color: #ccc;
		border: none;
		cursor: default;
	}

	.m-buybar .buynow.s-fc {
		background: #000;
	}

	.m-buybar .addcart {
		background-color: #ff8587;
		color: #fff;
	}

	.m-buybar .addcart.dis {
		color: #fff;
		background-color: #ccc;
		border: none;
		cursor: default;
	}

	.m-buybar .collect {
		position: relative;
		/* width: 95px; */
		width: 55px;
		/* padding-top: 12px; */
		/* border-top: 1px solid #ddd; */
		/* border-right: 1px solid #ddd; */
		color: #666;
		font-size: 12px;
	}

	.m-buybar .collect:after {
		content: "";
		position: absolute;
		width: 20px;
		height: 20px;
		top: 7px;
		left: 17px;
		background-size: 200px;
	}

	.m-buybar .collect-1 {
		background-position: -161px 1px;
	}

	.m-buybar .collect-1:after {
		background-position: -139px -33px;
	}

	.m-buybar .cart {
		position: relative;
		width: 55px;
		/* padding-top: 12px; */
		/* border-top: 1px solid #ddd; */
		color: #666;
		font-size: 12px;
		background-size: 200px;
	}

	.m-buybar .cart .count {
		position: absolute;
		min-width: 16px;
		height: 16px;
		left: 27px;
		top: 2px;
		background-color: #fff;
		color: #e31436;
		-webkit-border-radius: 8px;
		border-radius: 8px;
		font-size: 12px;
		line-height: 14px;
		text-align: center;
		padding: 0 4px;
		border: 1px solid #e31436;
	}

	.m-buybar .nogoods {
		position: absolute;
		top: -40px;
		left: 0;
		width: 100%;
		padding-left: 10px;
		background-color: rgba(0,0,0,0.7);
		text-align: left;
		font-size: 16px;
		line-height: 40px;
		color: #fff;
	}

	.m-buybar .nogoods:after {
		content: "";
		position: absolute;
		width: 70px;
		height: 45px;
		left: 10px;
		top: -35px;
		background-size: 200px;
	}

	.m-buybar .cantdeliver {
		position: absolute;
		text-align: center;
		top: -40px;
		left: 0;
		width: 100%;
		background-color: rgba(0,0,0,0.8);
		font-size: 12px;
		line-height: 40px;
		color: #fff;
	}

	.m-buybar .hide {
		display: none;
	}
	
	.customStyle{
	  border: none !important;
	  background-color:transparent;
	  padding-left: 0rpx !important;
	  padding-right: 0rpx !important;
	}
	
	.customStyle::after {
	  border: none;
	}
	
	.bg-white{
		background-color: #FFFFFF;
	}
	
	.itm-value{
		font-weight: 500;
	}
	
	.f-els-1{
		line-height: 48rpx;
	}
	
	.recovery {
		color: #fff;
		background: #eab315;
	}
	
	.view-pro{
		color: #fff;
		background: #3b79fe;
	}
	
	.slot-content {
		font-size: 28rpx;
		color: #bcbcbc;
		text-align: center;
		margin: 0 auto;
	}
	
	.richtext-content {
		padding-left: 13px;
		padding-right: 13px;
		color: #525252;
	}
	
</style>
